Skip to content

fix memory profiling race condition#211

Merged
huntie merged 1 commit into
mainfrom
fix-memory-profiling-race-condition
Oct 13, 2025
Merged

fix memory profiling race condition#211
huntie merged 1 commit into
mainfrom
fix-memory-profiling-race-condition

Conversation

@vzaidman

@vzaidman vzaidman commented Oct 13, 2025

Copy link
Copy Markdown

Summary

Fixed react/react-native#49158 - When a memory heap snapshot is created, it is being retrieved before it's parsing is complete.

Test plan

Slow down parseInput by adding:

    await new Promise(resolve => setTimeout(resolve, 3000));

As the first line of that function to ensure the race condition always resolves with a crash.

Before:

before2.mov

After:

after.mov
  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

@huntie huntie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for catching this finally 👏🏻

@huntie huntie merged commit 54afd87 into main Oct 13, 2025
5 checks passed
@huntie huntie deleted the fix-memory-profiling-race-condition branch October 13, 2025 19:50
@vzaidman

vzaidman commented Jan 5, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.77][Android] Memory Profiling not working, causing dev tools to disconnect

2 participants